export default [
  {
    path: 'user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: 'login',
        component: 'user/Login',
      },
    ],
  },
  {
    path: 'park',
    name: 'park',
    icon: 'CarOutlined',
    routes: [
      {
        path: '/park',
        redirect: '/park/park-lot',
      },
      {
        path: 'park-lot',
        name: 'parkLot',
        access: 'ParkingZoneManagement',
        component: 'park/park-lot',
      },
      {
        path: 'passes-record',
        name: 'passesRecord',
        access: 'SysRoleReservationManagement',
        component: 'park/passes-record',
      },
      {
        path: 'park-charge',
        name: 'parkCharge',
        access: 'SysRoleSchemeManagement',
        component: 'park/park-charge',
      },
    ],
  },
  {
    path: 'order',
    name: 'order',
    icon: 'transaction',
    routes: [
      {
        path: '/order',
        redirect: '/order/park-order',
      },
      {
        path: 'park-order',
        name: 'parkOrder',
        access: 'SysRoleParkingOrderManagement',
        component: 'order/park-order',
      },
      // {
      //   path: 'pay-record',
      //   name: 'payRecord',
      //   component: 'order/pay-record',
      // },
      // {
      //   path: 'refund-record',
      //   name: 'refundRecord',
      //   component: 'order/refund-record',
      // },
    ],
  },
  {
    path: 'membership',
    name: 'membership',
    icon: 'InteractionOutlined',
    routes: [
      {
        path: '/membership',
        redirect: '/membership/template',
      },
      // {
      //   path: 'information',
      //   name: 'information',
      //   access: 'canAdminManagement',
      //   component: 'membership/information',
      // },
      {
        path: 'template',
        name: 'template',
        access: 'canAdminManagement',
        component: 'membership/template',
      },
    ],
  },
  {
    path: 'power',
    name: 'user',
    access: 'canUserConfiguration',
    icon: 'UsergroupAddOutlined',
    routes: [
      {
        path: '/power',
        redirect: '/power/account',
      },
      {
        path: 'account',
        name: 'account',
        access: 'canAdminManagement',
        icon: 'user',
        component: 'user/Admin',
      },
      {
        path: 'tenant',
        name: 'tenant',
        access: 'canTenant',
        icon: 'user',
        component: 'Tenant/Tenant',
      },
      {
        path: 'role',
        name: 'role',
        access: 'canUserRole',
        icon: 'user',
        component: 'Auth/AuthRole',
      },
      {
        path: 'permission',
        name: 'access',
        access: 'canUserPermission',
        icon: 'book',
        component: 'Auth/AuthPermission',
      },
    ],
  },
  {
    path: 'park-test',
    name: 'park-test',
    icon: 'CarOutlined',
    access: 'canParkingTrafficTest',
    routes: [
      {
        path: 'traffic-record',
        name: 'traffic',
        component: 'test/traffic',
      },
    ],
  },
  {
    path: '/',
    redirect: '/park',
  },
  {
    hideInMenu: true,
    component: './404',
  },
];
